package cn.wsn2018.tools.common;

import java.util.HashMap;
import java.util.Map;

/**
 * 将常用字符串作为静态常量放置此处,避免使用硬编码的不良习惯
 */
public class CommonValue {

    public static final String FUNCTION_AUTHNEGO = "authNego";
    public static final String FUNCTION_ENCRYPTNEGO = "encryptNego";
    public static final String FUNCTION_ENCRYPT = "encrypt";
    public static final String FUNCTION_EXCEPTION = "exception";
    public static final String FUNCTION_VIRUS = "virus";
    public static final String FUNCTION_RESEND = "resend";
    public static final String FUNCTION_INTEGRITY = "integrity";

    public static final String JSON_INSERT_SUCCESS="插入成功";
    public static final String JSON_INSERT_FAILED="插入失败";
    public static final String JSON_USERNAME_EXIST="用户名已存在";
    public static final String JSON_USERNAME_NOTEXIST="用户不存在";
    public static final String JSON_PASSWORD_FAILED="用户密码错误";
    public static final String JSON_CREATE_USER_SUCCESS="添加成功";
    public static final String JSON_LOGIN_SUCCESS="登录成功";
    public static final String JSON_lOGIN_FAILED="登录失败";
    public static final String JSON_QUERY_SUCCESS="查询成功";
    public static final String JSON_QUERY_FAILED="查询失败";
    public static final String JSON_INPUT_ERROR="输入参数有误";
    public static final String JSON_QUERY_NULL="查询结果为空";
    public static final String JSON_UPDATE_SUCCESS="修改成功";
    public static final String JSON_UPDATE_FAILED="修改失败";
    public static final String JSON_DELETE_SUCCESS="删除成功";
    public static final String JSON_DELETE_FAILED="删除失败";
    public static final String JSON_LOGIN_ONLINE="online";
    public static final String JSON_NOT_LOGIN="notlogin";
    public static final String JSON_LOGOUT_SUCCESS="登出成功";
    public static final String JSON_LOGOUT_FAILED="登出失败";
    public static final String JSON_ROLE_ERROR="权限不够";
    public static final String JSON_TEST_FINISH="测试完成";
    public static final String JSON_MODEL_SUCCESS="切换模式成功";
    public static final String JSON_MODEL_FAILED="切换模式失败";
    public static final String JSON_IDCODE_SUCCESS="成功获取验证码";
    public static final String JSON_CHECKIDCODE_SUCCESS="验证码正确";
    public static final String JSON_CHECKIDCODE_FAILED="验证码错误";

    public static final String DEFAULT_PASSWORD="888888";
    public static final String CREATE_TYPE="create";
    public static final String UPDATE_TYPE="update";
    public static final String DELETE_TYPE="delete";
    public static final String LOGIN_TYPE="login";
    public static final String LOGOUT_TYPE="logout";
    public static final String TEST_TYPE="test";
    public static final String SUCCESS="success";
    public static final String FAILED="fail";
    public static final String CREATE_USER_LOGINFO="新建用户";
    public static final String UPDATE_USER_LOGINFO="更新用户";
    public static final String DELETE_USER_LOGINFO="删除用户";
    public static final String LOGIN_LOGINFO="登录";
    public static final String LOGOUT_LOGINFO="登出";
    public static final String CREATE_DESIGN_LOGINFO="新建协议设计";
    public static final String UPDATE_DESIGN_LOGINFO="更新协议设计";
    public static final String DELETE_DESIGN_LOGINFO="删除协议设计";
    public static final String CREATE_CONFIG_LOGINFO="新建协议配置";
    public static final String UPDATE_CONFIG_LOGINFO="更新协议配置";
    public static final String DELETE_CONFIG_LOGINFO="删除协议配置";
    public static final String TEST_CONFIG_LOGINFO="测试协议";
    public static final String CREATE_TESTREPORT_LOGINFO="新建协议测试报告";
    public static final String DELETE_TESTREPORT_LOGINFO="删除协议测试报告";
    public static final String CREATE_ENCODE_LOGINFO="新建编码设计";
    public static final String UPDATE_ENCODE_LOGINFO="更新编码设计";
    public static final String DELETE_ENCODE_LOGINFO="删除编码设计";
    public static final String PRE_MESSAGE_SEND="预处理信息发送";

    public static final String AES_CBC="AES-CBC";
    public static final String AES_OFB="AES-OFB";
    public static final String _3DED_CBC="3DED-CBC";
    public static final String _3DES_OFB="3DES-OFB";
    public static final String MD5="MD5";
    public static final String SHA1="SHA1";
    public static final String 字段长度溢出="字段长度溢出";
    public static final String 报文首部合法性="报文首部合法性";
    public static final String BASE64="Base64";
    public static final String HEX="Hex";
    public static final String FRONT_4="FRONT_4";
    public static final String MID_4="MID_4";
    public static final String REAR_4="REAR_4";
    public static final String FRONT_2_AND_RAER_2="FRONT_2_AND_RAER_2";
    public static final String ISEXCEPTION="Exception";
    public static final String NOEXCEPTION="NoException";

    public static final String ROLE_ADMIN="admin";
    public static final String ROLE_AUDITOR="auditor";
    public static final String ROLE_OPERATOR="operator";
    //public static final String IP = "192.168.1.10";
    public static final String IP = "127.0.0.1";
    public static final String REMOTE="119.29.242.75:2701";
    public static final String PORT = "80";
    public static final String PARAM = "/cgi-bin/protocol_tools/tools.cgi?";
    public static final String URL = "http://" + IP + ":" + PORT+PARAM;

    public static final String WARNINGLOGMODULE ="告警日志模块";
    public static final String ERRLOGMODULE ="错误日志模块";
    public static final String LOGMODULE ="业务日志模块";
    public static final String LOGINMODULE="系统登陆模块";
    public static final String DESIGNMODULE="协议设计模块";
    public static final String TESTMODULE="协议测试模块";
    public static final String BROWSEMODULE="协议预览模块";

    //日志
    public static final String LOG_TYPE_0="系统日志";
    public static final String LOG_TYPE_1="业务日志";
    //告警日志
    public static  final String WARNING_TYPE_0="账号异常";
    public static  final String WARNING_TYPE_1="越权访问";
    public static  final String WARNING_LEVEL_0="严重";
    public static  final String WARNING_LEVEL_1="一般";

    public static final Map<String,String> protocolMap = new HashMap<String,String>(){
        {
            put("IEC-60870-5-101", "101");
            put("IEC-60870-5-104", "104");
            put("IEC-61850-MMS", "MMS");
            put("IEC-61850-SV", "SV");
            put("IEC-61850-GOOSE", "GOOSE");
            put("DNP3", "DNP3");

        }
    };


}
